# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=tracker-miners
pkgver=2.3.3
pkgrel=2
pkgdesc="Data miners for tracker"
url="https://developer.gnome.org/libtracker-miner/stable"
arch="all !s390x" # networkmanager not avail due to iwd
license="GPL-2.0-or-later"
depends="tracker"
makedepends="meson glib-dev intltool tracker-dev ffmpeg-dev dbus-dev exempi-dev
	flac-dev gexiv2-dev gstreamer-dev enca-dev libexif-dev
	libgsf-dev libgxps-dev libiptcdata-dev libjpeg-turbo-dev libosinfo-dev
	libpng-dev libseccomp-dev tiff-dev libxml2-dev libvorbis-dev poppler-dev
	taglib-dev totem-pl-parser-dev upower-dev zlib-dev gst-plugins-base-dev
	giflib-dev libgrss-dev icu-dev"
checkdepends="bash coreutils python3 py3-gobject3"
options="!check" # Requires itself to be installed on the system
subpackages="$pkgname-doc $pkgname-lang $pkgname-dbg"
source="https://download.gnome.org/sources/tracker-miners/${pkgver%.*}/tracker-miners-$pkgver.tar.xz"

build() {
	meson \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--buildtype=plain \
		-Dtracker_core=system \
		-Dsystemd_user_services=no \
		-Dminer_rss=false \
		. output
	ninja -C output
}

check() {
	ninja -C output test
}

package() {
	DESTDIR="$pkgdir" ninja -C output install
}

sha512sums="1e845aaa5412125df84298a05f29888b3872c0f4d9251f026dd51846831fcd4aa0c6965c85752d7b6ed6548268d21f0fd2a8427c922a5dc0afcd294286c607e2  tracker-miners-2.3.3.tar.xz"
